﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BusinessRules;
using System.Data;

namespace BusinessLibary
{
    public class RegisterInfoFacade
    {
        public DataSet GetRegisterInfo(string inhosID, string syxh, int centerid)
        {
            try
            {
                RegisterInfoRules rule = new  RegisterInfoRules();
                return rule.GetRergisterInfo(inhosID, syxh, centerid);
            }
            catch (Exception e)
            {
                throw new Exception(e.Message, e);
            }
        }

        /// <summary>
        /// 获取所有的医保病人
        /// </summary>
        /// <returns></returns>
        public DataSet FindAllMedicarePatientInfo()
        {
            try
            {
                RegisterInfoRules rule = new RegisterInfoRules();
                return rule.FindAllMedicarePatientInfo();
            }
            catch (Exception e)
            {
                throw new Exception(e.Message, e);
            }
        }

        /// <summary>
        /// 获取已经医保登记过的病人
        /// </summary>
        /// <returns></returns>
        public DataSet FindbyRegistedPatientInfo()
        {
            try
            {
                RegisterInfoRules rule = new RegisterInfoRules();
                return rule.FindbyRegistedPatientInfo();
            }
            catch (Exception e)
            {
                throw new Exception(e.Message, e);
            }
        }

        /// <summary>
        /// 获取已经医保登记过的病人
        /// </summary>
        /// <returns></returns>
        public DataSet FindbyRegistedPatientInfo(string strWhere)
        {
            try
            {
                RegisterInfoRules rule = new RegisterInfoRules();
                return rule.FindbyRegistedPatientInfo(strWhere);
            }
            catch (Exception e)
            {
                throw new Exception(e.Message, e);
            }
        }


        public DataSet FindbyRegistedPatientInfo(DateTime beginTime,DateTime endTime)
        {
            try
            {
                RegisterInfoRules rule = new RegisterInfoRules();
                return rule.FindbyRegistedPatientInfo(beginTime,endTime);
            }
            catch (Exception e)
            {
                throw new Exception(e.Message, e);
            }
        }


        public DataSet FindbyRegistedPatientInfoByInhosID(string inhosid)
        {
            try
            {
                RegisterInfoRules rule = new RegisterInfoRules();
                return rule.FindbyRegistedPatientInfoByInhosID(inhosid);
            }
            catch (Exception e)
            {
                throw new Exception(e.Message, e);
            }
        }
        /// <summary>
        ///获取还没有已经进行住院登记但没有上传到医保中心的病人
        /// </summary>
        /// <returns></returns>
        public DataSet FindbyUnRegistPaientInfo()
        {
            try
            {
                RegisterInfoRules rule = new RegisterInfoRules();
                return rule.FindbyUnRegistPaientInfo();
            }
            catch (Exception e)
            {
                throw new Exception(e.Message, e);
            }
        }

        
    }



}
